export function findMenu(menuList: any, path: string, small?: boolean) {
    // 一些静态数据单独判断了
    if(path === '/') {
        return {
            name: '首页',
            path: '/'
        }
    }

    if (!menuList) return;
    const menu = small?menuList.find((item: any) => item.path.toLocaleLowerCase() === path): menuList.find((item: any) => item.path === path);
    if (menu) {
        return menu;
    }
    for (let i = 0; i < menuList.length; i++) {
        const item = menuList[i];
        if (item.children) {
            const menu: any = findMenu(item.children, path);
            if (menu) {
                return menu;
            }
        }
    }
}